Use version pattern in noDependencyManagementSection test#7475
Merged
knutwannheden merged 1 commit intomainfrom Apr 27, 2026
Merged
Use version pattern in noDependencyManagementSection test#7475knutwannheden merged 1 commit intomainfrom
noDependencyManagementSection test#7475knutwannheden merged 1 commit intomainfrom
Conversation
ChangeDependencyGroupIdAndArtifactIdTest.noDependencyManagementSection hardcoded the post-recipe junit-jupiter version as 5.14.3, but the recipe resolves "5.x" against Maven Central at runtime. Every new junit-jupiter 5.x patch release breaks CI for every PR until someone bumps the literal. The most recent break is 5.14.4, published earlier today. Switch the assertion to a regex pattern matching any 5.x.x release, following the convention established in #6799 / #6856.
noDependencyManagementSection test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
ChangeDependencyGroupIdAndArtifactIdTest.noDependencyManagementSectionresolves the latest5.xoforg.junit.jupiter:junit-jupiterfrom Maven Central at runtime, but asserts against a hardcoded post-recipe version (5.14.3). Every newjunit-jupiterpatch release breaks CI for every PR opened thereafter until someone bumps the literal. The most recent break is5.14.4, published earlier today — verified locally onorigin/mainHEAD with the same5.14.3 → 5.14.4diff seen in the CI failure on Align ASM and Kotlin stdlib versions across modules #7474.Summary
5.x.xrelease ofjunit-jupiter, following the convention introduced in Use flexible version assertions in ChangeDependencyGroupIdAndArtifactId tests #6799 and Use version patterns in ChangeDependencyGroupIdAndArtifactId tests #6856 for similarly-flaky tests in this same file.Test plan
./gradlew :rewrite-maven:test --tests "org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactIdTest.noDependencyManagementSection"—BUILD SUCCESSFULagainst today'sjunit-jupiter:5.14.4.